AccountService

interface AccountService

Interface defining the various authentication and account management services.

Inheritors

Functions

Link copied to clipboard
abstract fun authenticate(email: String, password: String, onResult: (Throwable?) -> Unit)

Authenticate a user with their email and password. This logs the user in by validating their credentials against Firebase.

Link copied to clipboard
abstract fun createAccount(email: String, password: String, onResult: (Throwable?) -> Unit)

Create a new account using the provided email and password. This registers a new user in Firebase with the given credentials.

Link copied to clipboard
abstract fun createAnonymousAccount(onResult: (Throwable?) -> Unit)

Create an anonymous account for the user. This signs the user in anonymously without requiring email or password.

Link copied to clipboard
abstract fun linkAccount(email: String, password: String, onResult: (Throwable?) -> Unit)

Link the current account to a new email and password. This operation links an email and password to the current user account.

Link copied to clipboard
abstract fun logout(onResult: (Throwable?) -> Unit)

Log out the currently authenticated user. This signs the user out of Firebase and invalidates their session.